package com.tank.bean.item;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

import org.directwebremoting.annotations.DataTransferObject;

import com.tank.bean.User;
@DataTransferObject
@Entity
@DiscriminatorValue("transpond")
public class Transpond extends Item {

	@Override
	public String getType() {
		return "转发";
	}
	@Override
	public void setAuthor(User author) {
//		author
		super.setAuthor(author);
	}
	
	@Override
	public void setParent(Item parent) {
		if(parent == null) return;
		//转发条数累加1
		parent.setTranspondCount(parent.getTranspondCount()+1);
		System.out.println(parent.getTranspondCount());
		super.setParent(parent);
	}
}
